var loc = document.location.href.toLowerCase();
var isRefer = loc.indexOf(".kao100.com");
if (isRefer > 0) {
    if ((loc == "http://kao100.com/") || (loc == "http://www.kao100.com/") || (loc == "http://www.kao100.com/srcindex.aspx")) {
        loc = "http://www.kaoyee.com/";
    }
    else if ((loc == "http://kao100.com/train/default.aspx") || (loc == "http://kao100.com/train/") || (loc == "http://train.kao100.com/") || (loc.indexOf("train.kao100.com/") > 0)) {
        loc = "http://ms.kaoyee.com/curricula/index.rails";
    }
    else if ((loc == "http://chengkao.kao100.com/chengkao/default.aspx") || (loc == "http://chengkao.kao100.com/chengkao/") || (loc == "http://chengkao.kao100.com/")) {
        loc = "http://ck.kaoyee.com/";
    }
    else if ((loc == "http://kaoyan.kao100.com/kaoyan/default.aspx") || (loc == "http://kaoyan.kao100.com/kaoyan/") || (loc == "http://kaoyan.kao100.com/")) {
        loc = "http://ky.kaoyee.com/";
    }
    else if ((loc == "http://fashuo.kao100.com/fashuo/default.aspx") || (loc == "http://fashuo.kao100.com/fashuo/") || (loc == "http://fashuo.kao100.com/")) {
        loc = "http://fs.kaoyee.com/";
    }
    else if ((loc == "http://sifa.kao100.com/sifa/default.aspx") || (loc == "http://sifa.kao100.com/sifa/") || (loc == "http://sifa.kao100.com/")) {
        loc = "http://sf.kaoyee.com/";
    }
    else if ((loc == "http://kuaiji.kao100.com/kuaiji/default.aspx") || (loc == "http://kuaiji.kao100.com/kuaiji/") || (loc == "http://kuaiji.kao100.com/")) {
        loc = "http://kj.kaoyee.com/";
    }

    loc = loc.replace("http://chengkao.", "http://ck.");
    loc = loc.replace("http://kaoyan.", "http://ky.");
    loc = loc.replace("http://fashuo.", "http://fs.");
    loc = loc.replace("http://sifa.", "http://sf.");
    loc = loc.replace("http://kuaiji.", "http://kj.");

    loc = loc.replace(".kao100.com", ".kaoyee.com");

    //alert(loc);
    document.location.href = loc;
}
else if ((loc == "http://kaoyee.com/") || (loc == "http://kao100.com/")) {
    document.location.href = "http://www.kaoyee.com/";
}